package Leetcode;

import java.util.Stack;

public class problem344 {
    public String reverseString(String s) {
        char[] chars = s.toCharArray();
        int left = -1, right = chars.length;

        while (++left < --right) {
            char c = chars[left];
            chars[left] = chars[right];
            chars[right] = c;
        }
        return new String(chars);
    }
}
